<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>upCoach</title>
    <link rel="stylesheet" href="css/fore/index.css">
    <link rel="stylesheet" href="css/bootstrap/3.3.6/bootstrap.css">
    <link rel="stylesheet" href="css/fore/lunbotu.css">
    <script src="js/jquery/2.0.0/jquery.min.js"></script>
    <link rel="stylesheet" href="css/fore/Cooldog.css">
    <link rel="stylesheet" href="css/fore/iconfont.css">
    <link rel="stylesheet" href="css/fore/upcoach.css">
    <script src="js/Cooldog.js"></script>
    <script src="js/vue.min.js"></script>
    <script src="js/fetch.min.js"></script>
    <script src="js/axios.min.js"></script>
</head>
<body>
<div id="allContent">
    <div class="header">
        <div class="top">
            <div class="top-logo fl">
                <a id="logo" href="#nowhere"><img src="img/car-logo.png" alt="" class="fl" style="margin-top: 20px;width: 45px">
                    <span class="top-logo-text">练车预约系统</span></a>
            </div>
            <div class="top-login">
                <div class="loginbox">
                    <div class="loginbox-r" title="个人中心">
                        <img  v-if="user != null" :src="['img/student/' + user.pic]" class="img-circle">
                        <a v-else href="login.html" target="_self"  style="line-height: 80px;" class="loginbtn">
                            登录
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <div class="header-nav">
            <ul id="nav-list">
                <li class="nav-list-li"><a href="index.html">首页</a></li>
                <li class="nav-list-li"><a href="selectcoach.html">明星教练</a></li>
                <li class="nav-list-li"><a href="testorder.html">考试报名</a></li>
                <li class="nav-list-li"><a href="order.html">练车预约</a></li>
                <li class="nav-list-li"><a href="teachingvideo.html">驾考视频</a></li>
                <li class="nav-list-li"><a href="register.html">驾校报名</a></li>
            </ul>
        </div>
    </div>
    <div class="main">
        <div class="main-con">
            <form class="form-horizontal">
                <div class="form-group">
                    <label for="inputText1" class="col-sm-2 control-label">教练姓名</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="inputText1" placeholder="Name">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputText2" class="col-sm-2 control-label">科目类型</label>

                    <select class="form-control" id="inputText2" placeholder="type" style="width: 415px;margin-left: 103px">
                        <option>科目一</option>
                        <option>科目二</option>
                        <option>科目三</option>

                    </select>
                </div>

                <div class="form-group">
                    <label for="inputText3" class="col-sm-2 control-label">电话</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="inputText3" placeholder="Tel">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputText4" class="col-sm-2 control-label">微信</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="inputText4" placeholder="WeChat">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputText5" class="col-sm-2 control-label">住址</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="inputText5" placeholder="address">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputText6" class="col-sm-2 control-label">tage</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="inputText6" placeholder="tage">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputText7" class="col-sm-2 control-label">简介</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="inputText7" placeholder="intro">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-info">添加</button>
                        <button type="reset" class="btn btn-warning">重置</button>
                    </div>
                </div>
            </form>

        </div>



    </div>
</div>
<div class="footer">
    <p>
        Good CarTeacher©2018 | QQ:123456789
        <a href="#">|关于我们</a>
        <a href="login.html">|驾校登录</a>
    </p>
</div>
<script>
    var url = "fore_student_getUser";
    new Vue({
        el: '#allContent',
        data: {
            user: []
        },
        mounted: function () {
            self = this;
            fetch(url).then(function (response) {
                response.json().then(function (jsonObject) {
                    console.log(jsonObject);
                    self.user = jsonObject.user; //数组
                    console.log(self.user);
                }).catch(function (err) {
                    console.log("Fetch错误：" + err);
                })
            })
        }
    });
</script>

</body>
</html>